package rtda.stack;

import instruction.Instruction;
import lombok.Data;
import rtda.heap.KMethod;

import java.util.Map;

@Data
public class Frame {
    // TODO： 为什么是public？
    // 本栈帧所代表的方法
    public final KMethod method;
    private final LocalVars localVars;
    private final OperandStack operandStack;
    private final Map<Integer, Instruction> instructionMap;
    public final Thread thread;
    public int nextPc;
    private int pc;

    // TODO: 搞清楚这个onPop的作用
    private Runnable onPop;
}
